package com.open.capacity.forum.model;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author moonholder
 * @Description 文章、资源文件元数据表 - 存储分类、标签等字典数据
 * @Date 15:08 2021/2/23
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class Metas implements Serializable {
    /**
     * id，主键自增
     */
    @TableId(value = "metaid", type = IdType.AUTO)
    private Integer metaid;

    /**
     * 名称
     */
    private String mtname;

    /**
     * 类型
     */
    private String mttype;

    /**
     * 编码
     */
    private String mtcode;

    /**
     * 排序
     */
    private Integer mtsort;

    /**
     * 数据状态1:正常 2:逻辑删除默认为1
     */
    @TableLogic(value = "1", delval = "2")
    private Boolean status;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date cretim;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updtim;

    private static final long serialVersionUID = 1L;
}

